# @Desc    : do what 
# @Author  : meihongliang  
# @Time    : 2025-03-18 00:52
import tushare as ts


def main():
    print('tushare...')
    # 设置tocken
    # 730e6ff27ce0f40fc109b78f6895be49ee1434f698842cb0eb5c59ea mine
    # ts.set_token('4d3e6a9124e73dac09371f3a5e57ccf866046edbe21747e390099543')
    ts.set_token('730e6ff27ce0f40fc109b78f6895be49ee1434f698842cb0eb5c59ea')
    pro = ts.pro_api()
    # df = pro.user(token='730e6ff27ce0f40fc109b78f6895be49ee1434f698842cb0eb5c59ea')
    # print(df)
    df_data = pro.daily(ts_code='002045.SZ', start_date='20241220', end_date='20250102')
    print(df_data.head())
    # # df_data.to_csv('ggdq.csv', index=False)
    # df = pro.query('trade_cal', exchange='', start_date='20180901', end_date='20181001',
    #                fields='exchange,cal_date,is_open,pretrade_date', is_open='0')
    # print(df)


if __name__ == '__main__':
    main()
